Curve on Surface
================

.. image:: https://github.com/nortikin/sverchok/assets/14288520/93b89074-7f66-4b38-a67b-49ba6ae1cbdd
  :target: https://github.com/nortikin/sverchok/assets/14288520/93b89074-7f66-4b38-a67b-49ba6ae1cbdd

Functionality
-------------

This node generates a (3D) curve by laying another (2D) curve into some
surface's UV space. In other words, it takes a curve, considers it as being
placed in 2D space of U and V parameters, and generates another curve by
evaluating the surface at U/V coordinates generated by the first curve. One may
say that this node draws the curve on the surface.

.. image:: https://github.com/nortikin/sverchok/assets/14288520/2ca06ed4-ed55-4d0f-b2d5-af6faa5136f1
  :target: https://github.com/nortikin/sverchok/assets/14288520/2ca06ed4-ed55-4d0f-b2d5-af6faa5136f1

* Generator-> :doc:`Random Vector </nodes/generator/random_vector_mk3>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Viz-> :doc:`Viewer Draw Curve </nodes/viz/viewer_draw_curve>`
* Viz-> :doc:`Viewer Draw Surface </nodes/viz/viewer_draw_surface>`

Inputs
------

This node has the following inputs:

* **Curve**. The curve to be drawn on the surface. This input is mandatory.
* **Surface**. The surface, on which to draw the curve. This input is mandatory.

Parameters
----------

This node has the following parameter:

* **Curve plane**. The coordinate plane, in which the input curve lies. This
  defines the pair of coordinates being used. The available values are **XY**,
  **YZ** and **XZ**. For example, if **XY** is selected, then Z coordinates of
  the input curve's points will be ignored. The default value is **XY**.

Outputs
-------

This node has the following output:

* **Curve**. The curve drawn on the surface.

Examples of usage
-----------------

Generate some surface and draw a circle on it:

.. image:: https://user-images.githubusercontent.com/284644/78508319-5ce15c80-779f-11ea-92a8-48e9ea65450c.png
  :target: https://user-images.githubusercontent.com/284644/78508319-5ce15c80-779f-11ea-92a8-48e9ea65450c.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Evaluate Curve </nodes/curve/eval_curve>`
* Surfaces-> :doc:`Extrude Curve Along Vector </nodes/surface/extrude_vector>`
* Surface-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`

It is possible to use such a curve, for example, to place cubes along it:

.. image:: https://user-images.githubusercontent.com/284644/78508386-f6a90980-779f-11ea-9156-edd05500a0f8.png
  :target: https://user-images.githubusercontent.com/284644/78508386-f6a90980-779f-11ea-9156-edd05500a0f8.png

* Generator-> :doc:`NGon </nodes/generator/ngon>`
* Generator-> :doc:`Box </nodes/generator/box_mk2>`
* Curves-> :doc:`Circle (Curve) </nodes/curve/curve_circle>`
* Curves-> :doc:`Cubic Spline </nodes/curve/cubic_spline>`
* Curves-> :doc:`Curve Zero-Twist Frame </nodes/curve/zero_twist_frame>`
* Surfaces-> :doc:`Extrude Curve Along Vector </nodes/surface/extrude_vector>`
* Surface-> :doc:`Evaluate Surface </nodes/surface/evaluate_surface>`
* Number-> :doc:`Number Range </nodes/number/number_range>`
* Matrix-> :doc:`Matrix In </nodes/matrix/matrix_in_mk4>`
* Viz-> :doc:`Viewer Draw </nodes/viz/viewer_draw_mk4>`
